export namespace="dapr-system"
export app_name="dapr"
export repo="dapr"
export helm="$repo/$app_name"
export dashboard_name="dapr-dashboard"
export helm_dashboard="dapr/dapr-dashboard"
export url="https://dapr.github.io/helm-charts/"

helm repo remove $repo
helm repo add $repo $url
helm repo update $repo

# helm search repo dapr --devel --versions

helm upgrade --create-namespace --install \
    --set global.registry="ghcr.nju.edu.cn/dapr" \
    -n $namespace $app_name $helm \
    --set dapr_scheduler.cluster.storageSize=16Gi \
    --set global.ha.enabled=true \
    --set dapr_scheduler.ha=true \
    --set dapr_placement.ha=true \
    --set global.tag=1.15.0-mariner \
    --devel
# --set dapr_scheduler.cluster.storageSize=16Gi --set dapr_scheduler.etcdSpaceQuota=16Gi
# --values ./oam/emqx/values.yaml --wait
# --version $version
# --set global.ha.enabled=true # 高可用

helm upgrade --create-namespace --install \
    $dashboard_name $helm_dashboard --namespace $namespace \
    --values ingress-values.yaml \
    --devel
